<?php

namespace app\mobile\controller;

use app\mobile\model\Banner;
use app\mobile\model\CaseModel;
use app\mobile\model\Config;
use app\mobile\model\GoodsModel;
//use app\mobile\model\IndexModel;
use app\mobile\model\InfoModel;
use app\mobile\model\JieModel;
use app\mobile\model\NewsModel;
use app\mobile\model\TypeModel;
use think\Controller;
use think\Cookie;
use think\Request;

class Base extends Controller
{
   public function _initialize()
    {

        $module     = strtolower(request()->module());
        $controller = strtolower(request()->controller());
        $action     = strtolower(request()->action());
        $url        = $module."/".$controller."/".$action;
        define("MOD",$module);
        define("CON",$controller);
        define("ACT",$action);
        
        
        parent::_initialize(); // TODO: Change the autogenerated stub
        header("Content-type:text/html;charset=utf-8");

        /**获取配置**/
        $config = new Config();
        $config_list = $config->getInfo();
        $this->assign('config_list', $config_list);



        

//        //商品
//        $goodsModel = new GoodsModel();
//        $goodsTypeList = $goodsModel->getNavList();
//        $this->assign('goodsTypeList', $goodsTypeList);
//
    }
    
        private function _banner($num, $typeId)
    {
        $model = new Banner();
        return $model->getList($num, ['language' => Cookie::get('language'), 'typeId' => $typeId]);
    }

}